<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>使用GD库</title>
</head>
<body>
<?php
	header("Content-type:image/png");
	$img=imagecreate(300,200); 
    //$white =imagecolorallocate($img,255,255,255);
	$black =imagecolorallocate($img,0,0,0);
	imagefilledrectangle($img, 200, 400, 0, 0, $black);
	ob_clean();  
	flush();
	imagejpeg($img);
	imagedestroy($img);
?>
</body>
</html>